/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.team1662.commands.auto;

 
import edu.wpi.first.wpilibj.team1662.Constants;
import edu.wpi.first.wpilibj.team1662.RobotMap;
import edu.wpi.first.wpilibj.team1662.commands.CommandBase;

/**
 *
 * @author DevBo
 */
public class AutoShoot extends CommandBase {
    
    
    public AutoShoot() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        setTimeout(RobotMap.shootTime);
        requires(launcher);
        requires(drivetrain);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        System.out.println("On Autoshoot");
        drivetrain.cheezit(0);
        launcher.lock();
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
            launcher.lock();//This was changed...so yeah...
            drivetrain.cheezit(0);
        }
 

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return isTimedOut();
    }

    // Called once after isFinished returns true
    protected void end() {
        
        drivetrain.cheezit(0);
        System.out.println("Done with Autoshoot");
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}
